﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.LEDCorrective.Domain.LEDSender
{
    /// <summary>
    /// 模组校正系数
    /// </summary>
    /// <remarks>
    //  模组校正系数
    //  struct _scp_modgp_adjust_t
    //  {
    //  	u_int32_t						id;				/*<模组ID*/
    //      SCP_COLOR_ADJUST_MATRIX_t	dark;  			/*<暗场颜色校正系数矩阵*/
    //      u_int16_t						rowNum;			/*<校正的总行数*/
    //  	SCP_ROW_ADJUST_t			rowAdjustDatas[0];	/*<rowNum个行校正数组*/	
    //  }PACKED;
    //  typedef _scp_modgp_adjust_t
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct SCP_MODGP_ADJUST_T
    {
        /// <summary>
        /// 模组ID
        /// </summary>
        public UInt32 id;

        /// <summary>
        /// 暗场颜色校正系数矩阵
        /// </summary>
        public SCP_COLOR_ADJUST_MATRIX_T dark;

        /// <summary>
        /// 校正的总行数
        /// </summary>
        public UInt16 rowNum;

        /// <summary>
        /// rowNum个行校正数组
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 192)] //TODO:
        public SCP_ROW_ADJUST_T[] rowAdjustDatas;
    }
}
